<template>
  <div class="content">
    <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
      <el-tab-pane label="商品基础信息" name="basic">
        <basic ref="basicRef"></basic>
      </el-tab-pane>
      <el-tab-pane label="规格库存" name="specificationInventory">
        <specification-inventory ref="specificationInventoryRef"></specification-inventory>
      </el-tab-pane>
      <el-tab-pane label="商品详情" name="details">
        <goods-details ref="detailsRef"></goods-details>
      </el-tab-pane>
      <el-tab-pane label="物流设置" name="物流设置">物流设置</el-tab-pane>
      <el-tab-pane label="发票设置" name="发票设置">发票设置</el-tab-pane>
      <el-tab-pane label="营销设置" name="营销设置">营销设置</el-tab-pane>
      <el-tab-pane label="其他设置" name="其他设置">其他设置</el-tab-pane>
    </el-tabs>
  </div>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import type { TabsPaneContext } from 'element-plus'

import basic from '../components/basic.vue'
import specificationInventory from '../components/specification-inventory.vue'
import goodsDetails from '../components/goods-details.vue'

const activeName = ref('basic')
const handleClick = (tab: TabsPaneContext, event: Event) => {
  console.log(tab, event)
}
</script>

<style>
.demo-tabs > .el-tabs__content {
  padding: 32px;
  color: #6b778c;
  font-size: 32px;
  font-weight: 600;
}
</style>
